<%--
  Created by IntelliJ IDEA.
  User: fulei.yang
  Date: 2017/11/7
  Time: 下午10:45
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%--我是干嘛的，我可以引入另外一个页面的啦！--%>
<%@include file="../common/common.jsp" %>
<%@include file="../common/headerlogin.jsp" %>
<html>
<head>
</head>
<body>
<style type="text/css">
    .col-sm-10 {
        margin-left: 10%;
    }

    .goods-img {
        width: 100%;
        height: 20%;
    }

    .goods-info {
        height: 330px;
    }
</style>
<div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">
    <c:forEach items="${goods}" var="good">
        <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 goods-info">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><c:out value="${good.goodsName}"/></h3>
                </div>
                <div class="panel-body">
                    <img src="<c:out value="${good.goodsImg}"/> " class="goods-img">
                    <div><p>
                        商品价格:<c:out value="${good.goodsPrice}"/> 元
                        <br>
                        <a href="<c:out value="${good.coupon.couponGoodsUrl}"/>"><font color="#dc143c">点我领取优惠券</font></a>
                    </p></div>
                </div>
            </div>
        </div>
    </c:forEach>
</div>
<div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">
    <ul class="pager">
        <li><a href="/searchdemo?currentPage=<c:out value="${currentPage-1}"/>&keyword=">上一页</a></li>
        <li><a href="/searchdemo?currentPage=<c:out value="${currentPage}"/>&keyword=">下一页</a></li>
    </ul>
</div>
</body>
</html>